from aip import AipNlp
from textteaser import TexTeaser
# nip_date = {
#     'AppID' : '16072605',
#     'API_Key' : 'XSPCu4GYUFphDRwetbFIdyj2',
#     'Secret_Key' : 'P1PXaLBinIO4wdKhxYcTkaSRFqKAKawr',
# }
#
# client = AipNlp(nip_date['AppID'], nip_date['API_Key'], nip_date['Secret_Key'])

text = None
with open('Hydroelectric energy.txt','r') as f:
    text = f.read()

print (text[:100])
tt = TexTeaser()
res = tt.summarize(title = 'Hydroelectric energy', text = text)
# res = client.newsSummary(text,120)

print(res)